﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ITagService.cs" company="Concept Architecture">
//   (c) 2010 Muhammad Umer Farooq
// </copyright>
// <summary>
//   Defines the ITagRepository type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Hisaab.Services.Interfaces
{
    using System.Collections.Generic;
    using System.ServiceModel;

    using Hisaab.Services.Entities;

    /// <summary>
    /// Defines the <seealso cref="ITagService"/> interface.
    /// </summary>
    [ServiceContract]
    public interface ITagService : IServiceBase<Tag>
    {
        /// <summary>
        /// Gets the by id.
        /// </summary>
        /// <param name="id">The id of tag</param>
        /// <returns>Tag matching by id</returns>
        [OperationContract]
        Tag GetById(int id);

        /// <summary>
        /// Gets the tags by transaction.
        /// </summary>
        /// <param name="transactionId">The transaction id.</param>
        /// <returns>List of tags associated with given transaction id</returns>
        [OperationContract]
        IEnumerable<Tag> GetTagsByTransaction(int transactionId);

        /// <summary>
        /// Gets the name of the by.
        /// </summary>
        /// <param name="tagName">Name of the tag.</param>
        /// <returns>Tag matching by name</returns>
        [OperationContract]
        Tag GetByName(string tagName);
    }
}